package com.example.alee.ALeeSpringWeb.bean;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

//@Component
@Configuration(proxyBeanMethods = true)  //proxyBeanMethods 默认True ApringCGLIB 代理容器 / false单独普通Bean、不放入容器
@ConfigurationProperties(prefix = "app")
public class AppBean {


    private String memo; // 这个是默认的配置文件-默认环境
    private String name; //ALeeSpringWeb
    private String owner;
    private Integer port;

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    @Override
    public String toString() {
        return "AppBean{" +
                "memo='" + memo + '\'' +
                ", name='" + name + '\'' +
                ", owner='" + owner + '\'' +
                ", port='" + port + '\'' +
                '}';
    }
}
